#pragma once

extern "C" 
{ 
#include "pdfapp.h" 
}; 

// static pdfapp_t gapp; 
// 
static HDC hdc; 
static HBRUSH bgbrush; 
static HBRUSH shbrush; 
static BITMAPINFO *dibinf; 
static int justcopied = 0; 
static fz_context *context; 


// CStaticPage

class CStaticPage : public CStatic
{
	DECLARE_DYNAMIC(CStaticPage)

public:
	CStaticPage();
	virtual ~CStaticPage();

protected:
	DECLARE_MESSAGE_MAP()
public:
	void blit();
//	afx_msg void OnPaint();
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
public:
    pdfapp_t gapp;
	bool isOpen ;
	void PDFOnKey(int ikey);
	void InitFile(CString strFilePath);
	void UnInitFile();
	int  iFileType; //0 init,1 pdf, 2 jpg
	CImage m_Image;
	afx_msg void OnPaint();
public:
	void GoToPage(int iPageId);

};


